package org.hibernate.test;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class HibernateListener implements ServletContextListener {

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		 HibernateUtil.getSessionFactory();

	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		 HibernateUtil.getSessionFactory().close();

	}

}
